﻿using System;
using Dsl.Ped.Framework.Common;

namespace Dsl.Ped.Framework.Exceptions
{
    /// <summary>
    /// Exception being thrown when attempt to register a projection under invalid name
    /// </summary>
    public class ProjectionInvalidNameRegisteredException : Exception
    {
        /// <summary>
        /// Gets or sets the projection we are registering under invalid name
        /// </summary>
        public IProjection Projection { get; private set; }

        /// <summary>
        /// Initializes a new instance of the <see cref="ProjectionInvalidNameRegisteredException"/> class.
        /// </summary>
        /// <param name="projection">The being installed under invalid name</param>
        public ProjectionInvalidNameRegisteredException(IProjection projection)
            : base("Projection name is invalid")
        {
            this.Projection = projection;
        }
    }
}
